<template>
  <div class="login">
    <img class="logo" src="@/assets/icons/svg/logo.svg" alt=""/>
    <LoginCard class="login-main"/>
    <div class="footer">
      <div class="footer">
        <span><a href="https://beian.miit.gov.cn/">{{ webInfo.getIcpInfo }}</a></span>
        <span>{{ webInfo.getCopyright }}</span>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import {webInfoStore} from "@/store";
import LoginCard from "@/components/LoginCard.vue";
const webInfo = webInfoStore()
</script>

<style scoped lang="less">
.login {
  width: 100%;
  height: 100vh; // 使用100vh来确保高度占满视口
  background-size: cover;
  background-image: url("https://img.mikufufu.com/image/5.webp");
  position: relative;
  z-index: 1;
  &:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
  }
  .logo {
    position: absolute;
    top: 24px;
    left: 40px;
    width: 176px;
    height: 48px;
    color: #FFFFFF;
  }
  .login-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
  }
}
.footer {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);// 水平居中
  height: 88px;
  color: #999; // 继承父组件的color属性
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  & > span {
    font-size: 12px;
    & > a {
      height: 20px;
      text-decoration: none;
      line-height: 17px;
      color: inherit;
      &:hover { /* 增加hover状态样式，提升用户体验 */
        text-decoration: underline;
      }
    }
    &:nth-child(2) {
      height: 24px;
      font-size: 16px;
      line-height: 23px;
    }
  }
}
</style>
